home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / ola-1p.tip < prev    next >
Text File  |  1993-09-15  |  2KB  |  92 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 36.2.5, p. IV-145.
  16. % Original source in file "o3.TEX", starting line 660.
  17. \wlog{L: "ola-1p.tip" ["o3.TEX," l. 660, p. IV-145]}%
  18. % This file DOES NOT belong to format "texip."
  19. \InputD{shboxes.tip}
  20. \catcode`\@ = 11
  21. \newbox\InsertOtherBox
  22. \def\FBOnePass #1#2#3{% 
  23.     \PrepareFigureBoxes{#1}{#2}{#3}
  24.     \setbox\InsertOtherBox = \vbox{% 
  25.         \offinterlineskip
  26.         \unvbox\InsertOtherBox
  27.         \penalty 0
  28.         \hbox{%
  29.             \valign{% 
  30.                 ##\vfil
  31.             \cr
  32.                 \copy 0\cr
  33.                 \copy 1\cr
  34.             }% 
  35.         }
  36.     }
  37.     \insert\FigureIns{% 
  38.         \hbox{%
  39.             \valign{% 
  40.                 ##\vfil
  41.             \cr
  42.                 \copy 1\cr
  43.                 \copy 0\cr
  44.             }% 
  45.         }
  46.     }
  47. }
  48. \def\OutCaptionGameOnePass{%
  49.     \setbox0 = \box\voidb@x
  50.     \ifodd\pageno
  51.         \dimen0 = 0pt
  52.         \let\Header = \RightHeader
  53.         \let\Footer = \RightFooter
  54.         \ifvoid\FigureIns
  55.         \else
  56.             \dimen1 = \ht\FigureIns
  57.             \setbox1 = \box\FigureIns
  58.             \setbox0 = \vsplit\InsertOtherBox to \dimen1 
  59.         \fi
  60.     \else
  61.         \dimen0 = \DiffWidth
  62.         \let\Header = \LeftHeader
  63.         \let\Footer = \LeftFooter
  64.         \ifvoid\FigureIns
  65.         \else
  66.             \dimen1 = \ht\FigureIns
  67.             \setbox1 = \vsplit\InsertOtherBox to \dimen1 
  68.             \setbox0 = \box\FigureIns
  69.         \fi
  70.     \fi
  71.     \shipout\vbox{%
  72.         \hrule height 1pt
  73.         \vskip 5pt
  74.         \Header
  75.         \vskip 12pt
  76.         \ifvoid 0
  77.         \else
  78.             \box 0
  79.             \vskip\skip\FigureIns
  80.         \fi
  81.         \moveright\dimen0 \BoxR 255
  82.         \vskip 12pt
  83.         \Footer
  84.     }
  85.     \global\advance\pageno by 1
  86.     \ifnum\outputpenalty > -20000
  87.     \else
  88.         \dosupereject
  89.     \fi
  90. }
  91. \catcode`\@ = 12
  92.